import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/ruoyi";

// // 新增前置机
export function addDevice(data) {
  return request({
    url: '/system/deviceConfig/add',
    method: 'post',
    data: data
  })
}

// 修改
export function editDevice(data) {
  return request({
    url: '/system/deviceConfig',
    method: 'put',
    data: data
  })
}

// 删除车辆
export function delDevice(ids) {
  return request({
    url: '/system/deviceConfig/' + ids,
    method: 'DELETE'
  })
}

//查询列表
export function getDevicelist(query) {
  return request({
    url: '/system/deviceConfig/list',
    method: 'get',
    params: query
  })
}


//查询设备列表
export function getDeviceCollect(query) {
  return request({
    url: '/system/deviceCollect/list',
    method: 'get',
    params: query
  })
}

//新增设备
export function addDeviceCollect(data) {
  return request({
    url: '/system/deviceCollect/add',
    method: 'post',
    data: data
  })
}

// 修改设备
export function editDeviceCollect(data) {
  return request({
    url: '/system/deviceCollect',
    method: 'put',
    data: data
  })
}

// 删除设备
export function delDeviceCollect(ids) {
  return request({
    url: '/system/deviceCollect/' + ids,
    method: 'DELETE'
  })
}


